package com.example.cdctest.service.impl;


import com.example.cdctest.mapper.WrongTopicMapper;
import com.example.cdctest.pojo.WrongTopic;
import com.example.cdctest.service.WrongTopicService;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional(rollbackFor = Exception.class)
public class WrongTopicImpl implements WrongTopicService
{

    @Resource
    private WrongTopicMapper wrongTopicMapper;

    @Override
    public void insert(WrongTopic object) {

    }

    @Override
    public void delete(Integer id) {

    }

    @Override
    public void delete(String ids) {

    }

    @Override
    public void update(WrongTopic object) {

    }

    @Override
    public WrongTopic findById(Integer id) {
        return null;
    }

    @Override
    public List<WrongTopic> findAll() {
        return null;
    }

    @Override
    public PageInfo<WrongTopic> findPage(int pageSize) {
        return null;
    }

    //取出错题
    @Override
    public List<WrongTopic> getWrongTopic(int id) {
        return wrongTopicMapper.selectWrongTopicById(id);
    }

    //取出错题数
    @Override
    public Integer getWrongCount(int id) {
        return wrongTopicMapper.selectWrongCountById(id);
    }
}
